﻿
using Xacml.Core;
using System;
using System.Collections;
using System.Xml;

namespace Xacml.Core.Policy
{
  public class PolicyElement : PolicyElementReadWrite
  {
    public override string Id
    {
      set
      {
        throw new NotSupportedException();
      }
    }

    public override string Description
    {
      set
      {
        throw new NotSupportedException();
      }
    }

    public override string RuleCombiningAlgorithm
    {
      set
      {
        throw new NotSupportedException();
      }
    }

    public override RuleCollectionReadWrite Rules
    {
      get
      {
        return (RuleCollectionReadWrite) new RuleCollection(base.Rules);
      }
      set
      {
        throw new NotSupportedException();
      }
    }

    public override TargetElementReadWrite Target
    {
      get
      {
        return (TargetElementReadWrite) new TargetElement(base.Target.Resources, base.Target.Subjects, base.Target.Actions, base.Target.Environments, base.Target.SchemaVersion);
      }
    }

    public override ObligationCollectionReadWrite Obligations
    {
      get
      {
        return (ObligationCollectionReadWrite) new ObligationCollection(base.Obligations);
      }
      set
      {
        throw new NotSupportedException();
      }
    }

    public override string XPathVersion
    {
      set
      {
        throw new NotSupportedException();
      }
    }

    public override IDictionary VariableDefinitions
    {
      set
      {
        throw new NotSupportedException();
      }
    }

    public override ArrayList CombinerParameters
    {
      set
      {
        throw new NotSupportedException();
      }
    }

    public override ArrayList RuleCombinerParameters
    {
      set
      {
        throw new NotSupportedException();
      }
    }

    public PolicyElement(string id, string description, TargetElementReadWrite target, RuleCollectionReadWrite rules, string ruleCombiningAlgorithm, ObligationCollectionReadWrite obligations, string xpathVersion, ArrayList combinerParameters, ArrayList ruleCombinerParameters, IDictionary variableDefinitions, XacmlVersion schemaVersion)
      : base(id, description, target, rules, ruleCombiningAlgorithm, obligations, xpathVersion, combinerParameters, ruleCombinerParameters, variableDefinitions, schemaVersion)
    {
    }

    public PolicyElement(XmlReader reader, XacmlVersion schemaVersion)
      : base(reader, schemaVersion)
    {
    }
  }
}
